<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/15
  Time: 9:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>活动管理</title>
    <%--    引入样式表--%>
    <link rel="stylesheet" href="static/layui/css/layui.css">
    <%--    引入js文件--%>
    <script src="static/layui/layui.js"></script>
</head>
<body>
<table id="demo" lay-filter="test">
</table>
</body>
<script>
    layui.use(['table', 'form', 'jquery', 'laydate'], function () {
        var layer = layui.layer;
        var form = layui.form;
        var $ = layui.jquery;
        var table = layui.table;
        //第一个实例
        var myTable = table.render({
            elem: '#demo'
            , height: 450
            , url: '${pageContext.request.contextPath}/student?method=findAllStudent' //数据接口
            , page: true //开启分页
            , limit: 5
            , limits: [5, 10, 15, 20, 25, 30]
            , autoSort: true//关闭前端自动排序，开启了后端的服务器排序
            , cols: [[ //表头
                {field: 'Id', title: '活动编号', width: 100, sort: true, fixed: 'left'}
                , {field: 'name', title: '姓名', width: 120}
                , {field: 'age', title: '年龄', width: 120, sort: true}
                , {field: 'phone', title: '手机号', width: 60}
                , {field: 'school', title: '学校/单位', width: 180}
                , {field: 'create_time', title: '创建时间', width: 180}
                , {field: 'business_id', title: '活动id', width: 180,hide:true}
                , {field: 'business_name', title: '活动名称', width: 180}

            ]]
        });
    });
</script>
</html>
